/**
 * 营运分析
 */
import React, { Component } from 'react';
import { connect } from 'dva';
import TabsChart from './components/TabsChart';

class OperationCapacity extends Component {
  componentDidMount() {
    const { dispatch } = this.props;
    dispatch({
      type: 'finance/getCharts',
      payload: {
        dataType: 'OperationCapacity',
        descKey: 'yy',
      },
    });
  }

  render() {
    const tabs = [
      {
        tab: '存货周转率1',
        key: 0,
      },
      {
        tab: '存货周转率2',
        key: 1,
      },
      {
        tab: '应收账款周转率',
        key: 2,
      },
      {
        tab: '固定资产周转率',
        key: 3,
      },
      {
        tab: '流动资产周转率',
        key: 4,
      },
      {
        tab: '总资产周转率',
        key: 5,
      },
    ];
    return <TabsChart tabs={tabs} />;
  }
}

export default connect()(OperationCapacity);
